import {get,post,put,postJson, putJson,del} from '../http/request.js'

export function getAvailableMeetingRooms(params) {
    return get('/meetingRooms/getMeetingRooms', params)
}

export const getRoomList = () => {
    return get('/meetingRooms/getAllMeetingRoomsStatus')
}

export const getAllMeetingRooms = () => {
    return get('/meetingRooms/getAllMeetingRooms')
}

export const updateRoomStatus = (params) => {
    return put('/meetingRooms/changeMeetingRoomsStatus', params)
}

export const createRoom = (params) =>{
    return postJson('/meetingRooms',params)
}

export const updateRoom = (id,params) =>{
    return putJson(`/meetingRooms/${id}`,params)
}
export const deleteRoom  = (id) =>{
    return del(`/meetingRooms/${id}`) // 使用模板字符串替换ID
}



export default {
    getRoomList,
    updateRoomStatus
}